/**  这里是合同管理  合同关联模块 */
import request from '@/utils/request'
const baseApi = '/contract'
// =========================================================================  字典  /public/down-dict
export function publicDownDict(type) {
  return request({
    url: baseApi + '/public/down-dict',
    method: 'get',
    params: { codeType: type }
  })
}
// =========================================================================  公共字典  /public/down-dict
export function dictionary(type) {
  return request({
    url: '/cd/dict/getDict',
    method: 'get',
    params: { codeType: type }
  })
}
// =========================================================================  合同关联列表 /contract-relation/list
export function contractRelationPage(query) {
  return request({
    url: baseApi + '/contract-relation/page',
    method: 'get',
    params: query
  })
}
// =========================================================================  选择合同列表 /relation/chose-contract
export function choseContract(query) {
  return request({
    url: baseApi + '/contract-relation/choose-contract',
    method: 'get',
    params: query
  })
}
// =========================================================================  新增合同关联/contract-relation/add
export function contractRelationAdd(obj) {
  return request({
    url: baseApi + '/contract-relation/add',
    method: 'post',
    data: obj
  })
}
// =========================================================================  合同关联详情 GET /contract-relation/detail
export function contractRelationDetail(id) {
  return request({
    url: baseApi + '/contract-relation/detail',
    method: 'get',
    params: { id }
  })
}
// =========================================================================  编辑关联合同 /contract-relation/detail
export function contractRelationEdit(obj) {
  return request({
    url: baseApi + '/contract-relation/edit',
    method: 'put',
    data: obj
  })
}
// ==========================================================================  合同附件配置分页查询 GET /contract-attachment-type/page
export function contractAttachmentTypePage(query) {
  return request({
    url: baseApi + '/contract-attachment-type/page',
    method: 'get',
    params: query
  })
}

// ==========================================================================  合同附件配置分页查询 POST /contract-attachment-type/operate
export function contractAttachmentTypeOperate(boj) {
  return request({
    url: baseApi + '/contract-attachment-type/operate',
    method: 'post',
    data: boj
  })
}

// =========================================================================  编辑合同附件 PUT /contract-attachment-type/edit
export function contractAttachmentTypeEdit(obj) {
  return request({
    url: baseApi + '/contract-attachment-type/edit',
    method: 'put',
    data: obj
  })
}
// =========================================================================  附件配置详情编辑时用 GET /contract-attachment-type/detail
export function contractAttachmentTypeDetail(rowId) {
  return request({
    url: baseApi + '/contract-attachment-type/detail',
    method: 'get',
    params: { id: rowId }
  })
}

// =========================================================================  附件配置删除 DELETE /contract-attachment-type/delete
export function contractAttachmentTypeDelete(rowId) {
  return request({
    url: baseApi + '/contract-attachment-type/delete',
    method: 'delete',
    params: { id: rowId }
  })
}
// ==========================================================================  合同附件配置新增 POST /contract-attachment-type/create
export function contractAttachmentTypeCreate(boj) {
  return request({
    url: baseApi + '/contract-attachment-type/create',
    method: 'post',
    data: boj
  })
}
// ==========================================================================  合同分析分页查询 GET /contract-attachment-type/page
export function contractAnalysisContractPage(query) {
  return request({
    url: baseApi + '/contract-analysis/contract-page',
    method: 'get',
    params: query
  })
}

// ==========================================================================  合同分析分页导出 GET /contract-analysis/contract-export
export function contractAnalysisContractExport(query) {
  return request({
    url: baseApi + '/contract-analysis/contract-export',
    method: 'get',
    params: query
  })
}
